import request from '@/utils/request'      // 按你项目的 axios 实例路径修改

// 分页查询
export const getNoticeList = (pageNum, pageSize, query) =>
  request.get('/api/notice/admin/list', {
    params: { pageNum, pageSize, ...query }
  })

// 新增
export const addNotice = (data) =>
  request.post('/api/notice/admin/add', data)

// 编辑
export const editNotice = (data) =>
  request.put('/api/notice/admin/edit', data)

// 删除
export const deleteNotice = (id) =>
  request.delete(`/api/notice/admin/${id}`)

export const fetchNoticeList = (params = {}) =>
  request.get('/api/notice/list', { params });